package yr.website

class Jobb {
    String name
    String require
    Date releaseTime
    Boolean state

    /**
     * 映射。
     */
    static mapping = {
        table "sys_job"
        version false
        name(column: "name", sqlType: "varchar(50)")
        require(column: "requires", sqlType: "longtext")
        releaseTime(column: "release_time", sqlType: "datetime")
        state(column: "state", sqlType: "tinyint(1)", defaultValue: "1", insertable: false)
    }

    static constraints = {
        name(nullable: false, unique: false)
        require(nullable: false, unique: false)
        releaseTime(nullable: false, unique: false)
        state(nullable: false, unique: false)
    }
}
